// @ts-ignore
import request from '@/utils/request';

//上传附件文件
export function uploadAttach(data) {
  return request({
    url: '/center/attachInfo/uploadAttach',
    method: 'post',
    data,
  });
}
//上传附件
export function upload(data) {
  return request({
    url: '/center/attachInfo/upload',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  });
}


// 获取分页数据
export function getListByPageAPI(params) {
    return request({
        url: '/center/attachInfo/list',
        method: 'get',
        params,
    });
}

// 新增
export function addAPI(data) {
    return request({
        url: '/center/attachInfo/add',
        method: 'post',
        data,
    });
}

// 根据id查询
export function getByIdAPI(id) {
    return request({
        url: '/center/attachInfo/view',
        method: 'get',
        params: { id },
    });
}

// 编辑
export function updateAPI(data) {
    return request({
        url: '/center/attachInfo/update',
        method: 'post',
        data,
    });
}

// 删除
export function delAPI(data) {
    return request({
        url: '/center/attachInfo/delete',
        method: 'post',
        data,
    });
}
